﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BusinessObject;
using BusinessLayer;

namespace RestHouseReservation
{
    public partial class ShowMyReservation : System.Web.UI.Page
    {
        public int length = 0;
        public List<ReservationDao> List = new List<ReservationDao>();
        ReservationLogic Logic = new ReservationLogic();
        public string PaNumber = "";
        public string D1 = "";
        public string D2 = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            PaNumber = Session["PaNumber"].ToString();
            D1 = Session["R_D1"].ToString();
            D2 = Session["R_D2"].ToString();
            List = Logic.MyReservation(D1,D2,PaNumber);
            length = List.Count();
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Session["R_D1"] = "";
            Session["R_D2"] = "";
            Server.Transfer("UserPage.aspx");
        }
    }
}